import getProjStatusSheet from '../mock/testsheet';
import { getTestData } from '../mock/jira';
import getProjDetail from '../mock/project';
import JiraControllers from '../Controllers/JiraController';

module.exports = router => {
  router.get('/api/testsheet', getProjStatusSheet);
  router.get('/api/currentUser', async function (ctx) {
    const data = {
      $desc: '获取当前用户接口',
      $params: {
        pageSize: {
          desc: '分页',
          exp: 2,
        },
      },
      $body: {
        name: 'Serati Ma',
        avatar: 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
        userid: '00000001',
        notifyCount: 12,
      },
    };
    ctx.body = data;
  });
  router.get('/api/project/:projectId', getProjDetail);
  router.get('/jira/bug/pandect', JiraControllers.bugPandect);
  router.get('/test/pandect', getTestData);
}